{% extends '@SyliusAdmin/shared/layout/base.html.twig' %}

{% set prefixes = configuration.vars.hook_prefix is defined ? [configuration.vars.hook_prefix] %}
{% set prefixes = prefixes|default({})|merge([
    'sylius_admin.%resource_name%'|replace({'%resource_name%': resource_name|default(metadata.name)}),
    'sylius_admin.common'
]) %}

{% set header = metadata.applicationName ~ '.ui.' ~ metadata.pluralName %}

{% block title %}{{ header|trans }} | {{ parent() }}{% endblock %}

{% block body %}
    {% hook 'create' with { _prefixes: prefixes, resource, metadata, configuration, form } %}
{% endblock %}

{% block stylesheets %}
    {{ parent() }}
    {% hook 'create#stylesheets' with { _prefixes: prefixes } %}
{% endblock %}

{% block javascripts %}
    {{ parent() }}
    {% hook 'create#javascripts' with { _prefixes: prefixes } %}
{% endblock %}
